xen/arm: Fix crash if last memory section is bigger than 1gb
authorFrediano Ziglio <freddy77@gmail.com>
Thu, 2 Oct 2014 15:16:37 +0000 (16:16 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Fri, 3 Oct 2014 13:34:32 +0000 (14:34 +0100)
commit6be01dffa0fba358a62bf68179628e3ab74ed0f1
tree48e150c89280dc28b1b458f3c3e1b6b0e3b48fe8
parentdb9cd6506647338fb07c65fa8da448d46c544218
xen/arm: Fix crash if last memory section is bigger than 1gb

On arm32 the xenheap has a maximum size of 1GB. On systems with more than 8GB
(so 1/8 total RAM is greater than 1GB) there is no point in searching for a
region with 1/8 of the total RAM when only 1GB will be used. Therefore limit
the maximum size to 1GB before searching.

Signed-off-by: Frediano Ziglio <frediano.ziglio@huawei.com>
Reviewed-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
[ ijc -- updated commit message as discussed ]
xen/arch/arm/setup.c